package com.tsy.server.system.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.tsy.server.common.BaseEntity;
import com.tsy.server.manage.model.dto.DeviceDTO;
import com.tsy.server.manage.model.entity.DeviceEntity;
import com.tsy.server.system.entity.ProjectUser;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Data
@ApiModel(description = "项目视图对象")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ProjectVO extends BaseEntity {

    @ApiModelProperty(value = "组织ID", example = "1")
    private Long orgId;

    @ApiModelProperty(value = "项目创建者ID", example = "1")
    private Long creatorId;

    @ApiModelProperty(value = "项目名称", example = "无人机巡检项目")
    private String name;

    @ApiModelProperty(value = "项目描述", example = "用于城市基础设施巡检")
    private String description;

    @ApiModelProperty(value = "项目状态", example = "1")
    private Integer status;

    @ApiModelProperty(value = "是否允许加入", example = "1")
    private Integer joinAble;

    @ApiModelProperty(value = "加入码", example = "ABCD1234")
    private String joinCode;

    @ApiModelProperty(value = "截止日期", example = "2023-12-31 23:59:59")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime deadline;

    @ApiModelProperty(value = "经度", example = "116.404")
    private Double longitude;

    @ApiModelProperty(value = "纬度", example = "39.915")
    private Double latitude;

    @ApiModelProperty(value = "用户名", example = "test")
    private String username;

    @ApiModelProperty(value = "项目人员列表", example = "[]")
    private List<ProjectUser> projectUsers;

    @ApiModelProperty(value = "项目设备列表", example = "[]")
    private List<DeviceEntity> projectDevices;
}